{% extends "entries.html" %}
{% load i18n %}
{% load fftogo_tags %}

{% block title %}
    {{ title }}
{% endblock %}
{% block estyle %}
    <style type="text/css">
        .reply{display:none;}
    </style>
{% endblock %}
{% block e_shortencomments %}{% for comment in entry.comments|shorten_comments:entries %}
    {% if comment.permalink %}
        <li class="permalink">
            <a href="{% url entry entry.id %}">{% blocktrans count comment.num as commentnum%}{{ commentnum }} more comment{% plural %} {{ commentnum }} more comments{%endblocktrans%}</a>
        </li>
    {% else %}
        <li id="{{ comment.id }}" class="comment {% ifequal comment.user.nickname request.session.nickname %}yourcomment{% endifequal %}">
            {% if request.session.googlemobileproxy %}
                {{ comment.body|urlizetrunc:30|gmpize|safe }}
            {% else %}
                {{ comment.body|urlizetrunc:30 }}
            {% endif %}
            -
            <a href="{% url user comment.user.nickname %}">{% ifequal comment.user.nickname request.session.nickname %}You{% else %}{{ comment.user.name }}{% endifequal %}</a>
            -
            <span title="{{ comment.date }}">{{ comment.date|timesince }}{% trans " ago" %}</span>
            {% if comment.via %}
                {% trans "via " %}<a class="via" href="{{ comment.via.url }}">{{ comment.via.name }}</a>
            {% endif %}
            {% ifequal request.session.nickname comment.user.nickname %}
                (<a href="{% url entry_comment entry.id %}?comment={{ comment.id }}&body={{ comment.body|urlencode }}&next={{ request.path }}">{% trans "edit" %}</a>
                |
                <a href="{% url comment_delete entry.id,comment.id %}?next={{ request.path }}">{% trans "delete" %}</a>)
            {% else %}
                {% ifequal request.session.nickname entry.user.nickname %}
                    (<a href="{% url comment_delete entry.id,comment.id %}?next={{ request.path }}">{% trans "delete" %}</a>)
                {% else %}
                    {% if room %}
                        {% if request.session.nickname|is_admin:profile %}
                            (<a href="{% url comment_delete entry.id,comment.id %}?next={{ request.path }}">{% trans "delete" %}</a>)
                        {% endif %}
                    {% endif %}
                {% endifequal %}
            {% endifequal %}
            {% ifnotequal comment.user.nickname request.session.nickname %}
            <a href="#" title="{% trans "Reply to " %}{{ comment.user.name }}" class="reply" eid="{{entry.id}}"> <img src="/static/images/reply.png" alt="@{{ comment.user.name }}"> </a>
            {% endifnotequal %}
        </li>
    {% endif %}
{% endfor %}{% endblock %}

{% block shortencomments %}{% endblock %}

{% block share %}{% endblock %}

{% block hide %}{% endblock %}
{% block cancel %}{% endblock %}
{% block reset %}<a href="#" class="reset" cid="{{entry.id}}">{%trans "Reset" %}</a>{% endblock %}